﻿//-------------------------------------------------------------------------------------------
// <copyright file="Account.cs" company="Russell Wilkins">
//     Copyright (c) Russell Wilkins 2014. All Rights Reserved.
// </copyright>
// <author>Russell Wilkins</author>
// <license href="license.txt">
//     The use of this software is governed by the Microsoft Public License
//     which is included with this distribution.
// </license>
//-------------------------------------------------------------------------------------------
namespace Ripple.Data
{
    /// <summary>
    /// Class to represent a Ripple account.
    /// </summary>
    public class Account : Entity
    {
        public Account(IRippleContext rippleContext)
            : base(rippleContext)
        {
        }

        /// <summary>
        /// Balance of XRP in drops, equivalent to 0.000001 (one 1-millionth) of an XRP each.
        /// </summary>
        public long Balance { get; internal set; }

        /// <summary>
        /// The unique id of this account.
        /// </summary>
        public string Id { get; internal set; }

        /// <summary>
        /// The sequence number of the next valid transaction for this account.
        /// Each account starts with Sequence = 1 and increases each time a transaction is made.
        /// </summary>
        public int NextTransactionSequenceNumber { get; internal set; }

        /// <summary>
        /// Number of other ledger entries (specifically, trust lines and offers) attributed to this account.
        /// This is used to calculate the total reserve required to use the account.
        /// </summary>
        public int OwnerCount { get; internal set; }

        /// <summary>
        /// Hash value representing the most recent transaction that affected this account.
        /// </summary>
        public string PreviousTransactionId { get; internal set; }
    }
}